import { Component, OnInit,Input } from '@angular/core';

@Component({
  selector: 'app-child1',
  template: '<h3>"{{name}}"</h3>'
})
export class Child1Component implements OnInit {

  @Input()
  get name():string {
    return this._name;
  }
  set name(name:string) {
    this._name = (name && name.trim()) || '<no name set>';
  }
  private _name = '';

  constructor() { }

  ngOnInit(): void {
  }

}
